package com.my.demo.controller;

import com.my.demo.pojo.Result;
import com.my.demo.utils.CreateFamilyTreeUtil;
import java.io.IOException;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author liangyuanshao
 * @date 2021/12/19 - 17:14
 */
@Controller
public class CreateFamilyTreeController {
  @Autowired
  CreateFamilyTreeUtil createFamilyTreeUtil;
  @PostMapping("/createFamilyTree")
  public Result ccreateFamilyTree(@RequestBody Map<String,Integer> map) throws IOException {
    Result result = new Result();
    result.setSuccess(false);
    result.setDetail(null);
    createFamilyTreeUtil.execFunc(map.get("familyArchiveId"));

    result.setSuccess(true);
    return result;
  }


}
